<include file="public@header" />
<style>
    .layui-input, input[type=text]{display: inline-block;}
</style>
</head>
<body>
<div class="layui-fluid js-check-wrap">
    <div class="layui-card">
        <form class="js-ajax-form" action="{:url('Menu/listOrder')}" method="post">
            <div class="layui-card-header well">
                <div class="layui-col-xs3">
                    <h2>{:lang('ADMIN_MENU_INDEX')}</h2>
                </div>
                <div class="layui-col-xs9 text-right">
                    <!-- 添加分类 -->
                    <a href="{:url('menu/add')}" class="layui-btn layui-btn-normal">{:lang('ADMIN_MENU_ADD')}</a>
                    <!-- 保存排序 -->
                    <button type="submit" class="layui-btn layui-btn-warm js-ajax-submit">{:lang('SAVE_SORT')}</button>
                    <a href="{:url('menu/lists')}" class="layui-btn layui-btn-danger">{:lang('ADMIN_MENU_LISTS')}</a>
                </div>
            </div>
            
            <div class="layui-card-body">
                <table class="layui-table" id="menus-table">
                    <thead>
                        <tr>
                            <th width="90" class="text-center">{:lang('SORT')}</th>
                            <th width="50">ID</th>
                            <th>{:lang('NAME')}</th>
                            <th>操作</th>
                            <th width="80">{:lang('STATUS')}</th>
                            <th width="180">{:lang('ACTIONS')}</th>
                        </tr>
                    </thead>
                    <tbody>
                    {$category}
                    </tbody>
                    
                </table>
            </div>
        </form>
    </div>
</div>

<include file="public@footer"/>
<script>
    $(document).ready(function() {
        Wind.css('treeTable');
        Wind.use('treeTable', function() {
            $("#menus-table").treeTable({
                indent : 20
            });
        });
    });
</script>
